{% extends "model/adminbase.html" %}
{% block title %} 添加读者等级 {% endblock %}
{% block script %}
    <script>
        $(function () {
            // 初始化 select组件样式

            // 修改成功
            if("{{ work }}" === "work"){
             setTimeout(function () {
                    alert("读者等级添加成功");
             },200)
         }
        })
    </script>
{% endblock %}

{% block content %}
    <form action="/add_class/" method="POST">

    {% csrf_token %}
      <!-- Input addon -->
            <div class="card card-info " style="margin-top: -20px;min-height: 500px">
              <div class="card-header  gradient-color-her">
                <h3 class="font-weight-light" style="color: #0b2e13">添加读者等级</h3>
              </div>
              <div class="card-body">

                  <div class="row"> <!--排版整个表单的row-->
                      <div class="col-sm-5 m-auto"><!--左侧一列-->

                          <div class="form-group">
                           <label for="{{ form.Class.id_for_label }}">等级名称</label>
                          {{ form.Class }}
                          <span id="terms-error" class="error invalid-feedback" style="display: inline;">{{ form.Class.errors }}</span>
                        </div>

                          <div class="form-group">
                           <label for="{{ form.Limited.id_for_label }}">借阅上限</label>
                          {{ form.Limited }}
                          <span id="terms-error" class="error invalid-feedback" style="display: inline;">{{ form.Limited.errors }}</span>
                        </div>
                          <div class="form-group">
                           <label for="{{ form.Days.id_for_label }}">借阅时间</label>
                          {{ form.Days }}
                          <span id="terms-error" class="error invalid-feedback" style="display: inline;">{{ form.Days.errors }}</span>
                        </div>
                        </div>


                  </div>
                  <!--提交按钮-->
                <div class="card-footer row " style="background-color: white">
                  <button type="submit" id="pwd-smt"  class="m-auto btn btn-primary  offset-lg-1 pwd-smt-bnt">添加</button>
                </div>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
     </form>
{% endblock %}
